/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mobitionary;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * @author DET J
 */
public class mobicore extends MIDlet implements CommandListener{
    private boolean midletPaused = false;

    public void initialize() {

    }

    public void startMIDlet() {

    }

    public void resumeMIDlet() {

    }

    public void exitMIDlet() {
        switchDisplayable(null, null);
        destroyApp(true);
        notifyDestroyed();
    }

    public void startApp() {
        if(midletPaused==true) {
            resumeMIDlet();
        } else {
            initialize();
            startMIDlet();
        }
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean unconditional) {
    }
    
    public void switchDisplayable(Alert alert, Displayable nextDisplayable) {
        Display display = getDisplay();
        if(alert == null) {
            display.setCurrent(nextDisplayable);
        } else {
            display.setCurrent(alert, nextDisplayable);
        }
    }

    public void commandAction(Command command, Displayable displayable) {

    }

    public Display getDisplay() {
        return Display.getDisplay(this);
    }
}
